package com.eazy.lkv2.web.controller.mobile.hotel;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.eazy.lkv2.web.controller.BaseController;
import com.eazy.lkv2.web.service.hotel.HotelCommentService;

/**
 * 
 * @author jzx
 * @date 2016-08-18 下午 17:09:30
 *	
 * 酒店评论
 */
@Controller
public class MobileCommentController extends BaseController<Object, Integer> {

	@Autowired
	private HotelCommentService hotelCommentService;
	
	@RequestMapping(value = "review.html/{hotelId}", method = RequestMethod.GET)
	public String review(@PathVariable String hotelId,Model model) {
		List<Map<String, Object>> data = hotelCommentService.selectCommentByHotelId(hotelId);

		model.addAttribute("hotelId", hotelId);
		model.addAttribute("data", data);
		return getDefault("hotel/review");
	}
}
